package com.zhu.esyblog.controller;

import com.zhu.esyblog.pojo.RespBean;
import com.zhu.esyblog.service.LoginService;
import com.zhu.esyblog.vo.LoginParams;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "注册模块")
@RequestMapping("register")
@RestController
public class RegisterController {
    @Autowired
    private LoginService loginService;

    @PostMapping
    @ApiOperation(value = "用户注册")
    public RespBean register(@RequestBody LoginParams loginParams){
        return loginService.register(loginParams);
    }
}
